package com.neusoft.mapper;

import com.neusoft.domain.Employee;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface EmployeeMapper {

    List<Employee> selectEmployeeByCondition(@Param("account") String account,@Param("nickname") String nickname,@Param("telephone") String telephone);

    @Insert("insert into employee (account, password, nickname, telephone) values (#{account},#{password},#{nickname},#{telephone})")
    void insertEmployee(Employee employee);

    @Update("update employee set account = #{account},nickname=#{nickname},telephone=#{telephone} where id = #{id}")
    void updateEmployeeById(Employee employee);

    @Update("update employee set is_del = #{is_del} where id = #{id}")
    void updateEmployeeStatusById(Employee employee);
}
